<%@ page contentType="text/html; charset=UTF-8" language="java" import="com.util.*,java.util.*" errorPage="/error.jsp" %>
<%@ page import="com.beans.log.*" %>
<%@ page import="com.business.log.*" %>
<%@ page import="com.beans.link.*" %>
<%@ page import="com.business.link.*" %>
<%@ page import="com.beans.user.*" %>
<%@ page import="com.business.user.*" %>
<%  UserListBus uis=new UserListBus();
	LogListBus llb=new LogListBus();
	LogReplyBus lrb=new LogReplyBus();
	LogTypeBus ltb=new LogTypeBus();
	List logList;
	String logtypeId=request.getPathInfo();	
	StringTokenizer t=new StringTokenizer(logtypeId,"/");
    String username=t.nextToken();
	UserInfo ui=uis.getUserInfo(username);
	String title=username+"的日志列表";
%>
<%@ include file="/header.jsp"%>
<body>
<div id=container>
<%@ include file="/top.jsp"%>
<div id=Tbody>
<div id=mainContent>
<div id=innermainContent>
<div id=mainContent-topimg></div>
<DIV class=Content-body style="TEXT-ALIGN: left">
 <%	

 if(t.hasMoreTokens()) {
 	    logtypeId=t.nextToken();
    	logtypeId=logtypeId.replace(".html","");		
    int id=Integer.parseInt(logtypeId);
	LogType lt=ltb.getLogTypeById(id);
	
%>
	<DIV class=content-width id=Content_Notice>
<DIV style="MARGIN-BOTTOM: 5px; BORDER-BOTTOM: #efefef 3px double; TEXT-ALIGN: left">您选择的分类是:<strong><font color=red><%=lt.getLogtypeName()%></font></strong>&nbsp;&nbsp;此分类描述：
<%=lt.getLogtypeMemo()%>
<br/></DIV></DIV>
<%
logList=llb.getAllLogByTypeID(id);
}
else 	logList=llb.getAllLogByShow(username);
		%>
		以下为博客的日志列表：(按时间排列）
<TABLE cellSpacing=2 cellPadding=2 width="100%">
  <TBODY>
  
 <%
if(logList==null||logList.size()==0) {
%>
<p>
<center><b><font color=red>还没有日志!</font></b></center><br/>
</P>
<% }
else{
	   for(int i=0;i<logList.size();i++) {
	  	 LogInfo li=(LogInfo)logList.get(i);
		 int typeId=Integer.parseInt(li.getLogtypeId());
		  List replyList=lrb.getReplyByLogNo(li.getLogNo());
	LogType lt=ltb.getLogTypeById(typeId);
	   %>

  <TR>
    <TD vAlign=top><IMG 
      style="MARGIN: 0px 2px -3px 0px" alt="点击以浏览日志内容~~" 
      src="images/2.gif" border=0> <A 
      title="作者:<%=li.getLogAuthor()%> 日期:<%=li.getLogPostTime()%>" 
      href="log/temp/<%=li.getLogNo()%>.html"><%=li.getLogTitle()%></A> </TD>
    <TD vAlign=top width=60><NOBR><%if(!lt.getLogtypeId().equals("")){%><A title="所在分类,点击浏览分类列表" 
href="show/<%=username%>/<%=lt.getLogtypeId()%>.html"><%=lt.getLogtypeName()%></A> |<%}%><A title=回复次数 
      href="log/temp/<%=li.getLogNo()%>.html"><%=replyList.size()%></A> | <A title=点击次数 
      href="log/temp/<%=li.getLogNo()%>.html"><%=li.getViewnums()%></a></NOBR></TD></TR>
<%	
	}
	}
%>
</TBODY></TABLE></DIV>
<div id=mainContent-bottomimg></div></div></div>
<%@ include file="/sidebar.jsp"%>
<%@ include file="/footer.jsp" %>
</body>
</html>